package com.yxr.mobileplayer.base;

import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;

import com.yxr.mobileplayer.tools.LArrayList;

public class ReplaceFragment extends Fragment {
    private LArrayList<BasePage> pageList;
    private int pageIndex;

    public ReplaceFragment( LArrayList<BasePage> pageList,int pageIndex){
        this.pageList = pageList;
        this.pageIndex = pageIndex;
    }


    @Nullable
    @Override
    public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        BasePage basePage = pageList.get(pageIndex);
        if( null != basePage ) return basePage.getRootView();
        return null;
    }

}
